package com.miku.blog.exception;

import com.miku.blog.eume.HttpStatusEnum;
import lombok.Data;

/**
 * @author shkstart
 * @create ${}YEAR-05-24 23:20
 */
@Data
public class SystemException extends RuntimeException{

    private Integer code;
    private String msg;

    public SystemException(){
        super();
    }

    public SystemException(Integer code,String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public SystemException(HttpStatusEnum httpStatusEnum) {
        super(httpStatusEnum.getMsg());
        this.code = httpStatusEnum.getCode();
        this.msg = httpStatusEnum.getMsg();
    }


}
